<!doctype html>
<html class="no-js">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="description" content="">
		<meta name="keywords" content="">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<title>Google News</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<link rel="stylesheet" href="css/amazeui.min.css">
		<link rel="stylesheet" href="css/app.css">
	</head>

	<body>
		<div class="am-g">
			<!-- 头部 -->
			<header data-am-widget="header" class="myAppHead am-header am-header-default">
				<div class="am-header-left am-header-nav">
					<a data-am-offcanvas="{target: '#doc-oc-demo2', effect: 'push'}">

						<i class="am-header-icon am-icon-bars"></i>
					</a>
				</div>

				<h1 class="am-header-title">
    <a href="#title-link" class="">
      Google News
    </a>
  </h1>

				<div class="am-header-right am-header-nav">
					<a href="#right-link" class="">

					</a>
				</div>
			</header>
			<!-- 栏目切换 -->
			<div data-am-widget="tabs" class="myAppTab am-tabs am-tabs-d2">
				<ul class="am-tabs-nav am-cf">
					<li class="am-active">
						<a class="news_type" href="[data-tab-panel-0]">Car</a>
					</li>
					<li class="">
						<a class="news_type" href="[data-tab-panel-1]">Game</a>
					</li>
					<li class="">
						<a class="news_type" href="[data-tab-panel-2]">International</a>
					</li>
				</ul>
				<div class="am-tabs-bd">
					<div data-tab-panel-0 class="myAppTabPanel am-tab-panel am-active">
						<div data-am-widget="slider" class="myAppSlider am-slider am-slider-a1" data-am-slider='{"directionNav":false}'>
							<ul class="am-slides">
								<li>
									<img class="lunboimg" src="img/Car2.jpg">

								</li>
								<li>
									<img class="lunboimg" src="img/Car3.jpg">
								</li>
							</ul>
						</div>
						<!-- 新闻列表 -->
						<div data-am-widget="list_news" class="myAppNews am-list-news am-list-news-default">

							<div class="am-list-news-bd">
								<ul class="am-list">

									<!--缩略图在标题右边-->
									<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-right">
										<div class=" am-u-sm-8 am-list-main">
											<h3 class="am-list-item-hd"><a href="###" class="car_news_title urlpage" id="">1</a></h3>

											<div id="am-list-item-text1" class="am-list-item-text car_news_content"></div>

										</div>
										<div class="am-u-sm-4 am-list-thumb">
											<a href="###" class="">
												<img class="car_img" src="img/Car1.jpg" />
											</a>
										</div>
									</li>
									<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-right">
										<div class=" am-u-sm-8 am-list-main">
											<h3 class="am-list-item-hd"><a href="###" class="car_news_title urlpage" id="">2</a></h3>

											<div id="am-list-item-text2" class="am-list-item-text car_news_content">You can now order 3D-printed "trophies" documenting your precise travels in 3D space</div>

										</div>
										<div class="am-u-sm-4 am-list-thumb">
											<a href="###" class="">
												<img class="car_img" src="img/Car2.jpg" alt="我最喜欢的一张画" />
											</a>
										</div>
									</li>
									<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-right">
										<div class=" am-u-sm-8 am-list-main">
											<h3 class="am-list-item-hd"><a href="###" class="car_news_title urlpage" id="">3</a></h3>

											<div id="am-list-item-text3" class="am-list-item-text car_news_content">You can now order 3D-printed "trophies" documenting your precise travels in 3D space</div>

										</div>
										<div class="am-u-sm-4 am-list-thumb">
											<a href="###" class="">
												<img class="car_img" src="img/Car3.jpg" alt="我最喜欢的一张画" />
											</a>
										</div>
									</li>
									<li class="am-g am-list-item-desced">
										<div class=" am-list-main">
											<h3 class="am-list-item-hd"><a href="###" class="car_news_title urlpage" id="">4</a></h3>
											<ul data-am-widget="gallery" class="myAppGallery am-gallery am-avg-sm-3
          am-avg-md-3 am-avg-lg-3 am-gallery-default" data-am-gallery="{ pureview: true }">
												<li>
													<div class="am-gallery-item">
														<a href="###" class="">
															<img class="car_img" src="img/Car4.jpg" alt="远方 有一个地方 那里种有我们的梦想" />

														</a>
													</div>
												</li>
												<li>
													<div class="am-gallery-item">
														<a href="###" class="">
															<img src="img/Car6.jpg" alt="某天 也许会相遇 相遇在这个好地方" />

														</a>
													</div>
												</li>
												<li>
													<div class="am-gallery-item">
														<a href="###" class="">
															<img src="img/Car7.jpg" alt="不要太担心 只因为我相信" />

														</a>
													</div>
												</li>

											</ul>

											<div id="am-list-item-text4" class="am-list-item-text car_news_content">We like seeing designers experimenting with the gradations between two extremes. Take wristwatches, for instance. </div>

										</div>
									</li>
									<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-right">
										<div class=" am-u-sm-8 am-list-main">
											<h3 class="am-list-item-hd"><a href="###" class="car_news_title urlpage" id="">5</a></h3>

											<div id="am-list-item-text5" class="am-list-item-text car_news_content">You can now order 3D-printed "trophies" documenting your precise travels in 3D space</div>

										</div>
										<div class="am-u-sm-4 am-list-thumb">
											<a href="###" class="">
												<img class="car_img" src="img/Car5.jpg" alt="我最喜欢的一张画" />
											</a>
										</div>
									</li>
									<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-right">
										<div class=" am-u-sm-8 am-list-main">
											<h3 class="am-list-item-hd"><a href="###" class="car_news_title urlpage" id="">6</a></h3>

											<div id="am-list-item-text6" class="am-list-item-text car_news_content">How awesome would it be to design, while still a student, the product that would set your entire future up? </div>

										</div>
										<div class="am-u-sm-4 am-list-thumb">
											<a href="###" class="">
												<img class="car_img" src="img/Car1.jpg" />
											</a>
										</div>
									</li>
									<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-right">
										<div class=" am-u-sm-8 am-list-main">
											<h3 class="am-list-item-hd"><a href="###" class="car_news_title urlpage" id="">7</a></h3>

											<div id="am-list-item-text7" class="am-list-item-text car_news_content">You can now order 3D-printed "trophies" documenting your precise travels in 3D space</div>

										</div>
										<div class="am-u-sm-4 am-list-thumb">
											<a href="###" class="">
												<img class="car_img" src="img/Car2.jpg" alt="我最喜欢的一张画" />
											</a>
										</div>
									</li>
								</ul>
							</div>

						</div>

					</div>
					<div data-tab-panel-1 class="myAppTabPanel am-tab-panel ">

						<div class="myAppImgNews">
							<div class="myAppImgNewsList">
								<div class="myAppImgNewsBlock">
									<img class="gameimg" src="img/Game1.jpg" alt="">
									<div class="myAppImgNewsTitle urlpage" id="">
										Purchased new from a Chicago department store in late 1940's or thereabouts.
									</div>
									<div class="myAppImgNewsUser">
										<div class="myAppImgNewsIco">
											<img src="img/c3.jpg">
										</div>
										<div class="myAppImgNewsName">
											体育大生意
										</div>
										<div class="myAppImgNewsTiem">
											ToDay At 12:35
										</div>
									</div>
								</div>

								<div class="myAppImgNewsBlock">
									<img class="gameimg" src="img/Game2.jpg" alt="">
									<div class="myAppImgNewsTitle urlpage" id="">
										I purchased the Marcel Wanders Haikus 75 cm ceramic plate with black metal display stand* for B&B Italia on the last day of December. This was my gift to me.
									</div>
									<div class="myAppImgNewsUser">
										<div class="myAppImgNewsIco">
											<img src="img/c5.jpg">
										</div>
										<div class="myAppImgNewsName">
											界面新闻
										</div>
										<div class="myAppImgNewsTiem">
											ToDay At 12:35
										</div>
									</div>
								</div>

								<div class="myAppImgNewsBlock">
									<img class="gameimg" src="img/Game3.jpg" alt="">
									<div class="myAppImgNewsTitle urlpage" id="">
										And, if so, do you know what kind of shade was on it? Thanks in advance
									</div>
									<div class="myAppImgNewsUser">
										<div class="myAppImgNewsIco">
											<img src="img/c2.jpg">
										</div>
										<div class="myAppImgNewsName">
											87G手机网
										</div>
										<div class="myAppImgNewsTiem">
											ToDay At 12:35
										</div>
									</div>
								</div>

								<div class="myAppImgNewsBlock">
									<img class="gameimg" src="img/Game4.jpg" alt="">
									<div class="myAppImgNewsTitle urlpage" id="">
										everyone. We have a sort of "gentlemans dresser" in teak, made in Denmark.
									</div>
									<div class="myAppImgNewsUser">
										<div class="myAppImgNewsIco">
											<img src="img/c1.jpg">
										</div>
										<div class="myAppImgNewsName">
											英雄联盟掌游宝
										</div>
										<div class="myAppImgNewsTiem">
											ToDay At 12:35
										</div>
									</div>
								</div>

								<div class="myAppImgNewsBlock">
									<img class="gameimg" src="img/Game5.jpg" alt="">
									<div class="myAppImgNewsTitle urlpage" id="">
										Coffee table in rosewood. Designed by Johs. Andersen and manufactured by CFC Silkeborg, Denmark...
									</div>
									<div class="myAppImgNewsUser">
										<div class="myAppImgNewsIco">
											<img src="img/c4.jpg">
										</div>
										<div class="myAppImgNewsName">
											搜狐游戏
										</div>
										<div class="myAppImgNewsTiem">
											ToDay At 12:35
										</div>
									</div>
								</div>
							</div>
						</div>

					</div>
					<div data-tab-panel-2 class="myAppTabPanel am-tab-panel ">
						<div data-am-widget="slider" class="myAppSlider am-slider am-slider-a1" data-am-slider='{"directionNav":false}'>
							<ul class="am-slides">
								<li>
									<img class="lunboimg2" src="img/International3.jpg">

								</li>
								<li>
									<img class="lunboimg2" src="img/International5.jpg">
								</li>
							</ul>
						</div>
						<!-- 新闻列表 -->
						<div data-am-widget="list_news" class="myAppNews am-list-news am-list-news-default">

							<div class="am-list-news-bd">
								<ul class="am-list">

									<!--缩略图在标题右边-->
									<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-right">
										<div class=" am-u-sm-8 am-list-main">
											<h3 class="am-list-item-hd"><a href="###" class="guoji_news_title urlpage" id="">The Digitally-Fabricated Version of a Map With Red Pins In It</a></h3>

											<div class="am-list-item-text guoji_news_content">How awesome would it be to design, while still a student, the product that would set your entire future up? </div>

										</div>
										<div class="am-u-sm-4 am-list-thumb">
											<a href="###" class="">
												<img class="interimg" src="img/International1.jpg" />
											</a>
										</div>
									</li>
									<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-right">
										<div class=" am-u-sm-8 am-list-main">
											<h3 class="am-list-item-hd"><a href="###" class="guoji_news_title urlpage" id="">Who Knew? The Waterbed Was Invented by an Industrial Design</a></h3>

											<div class="am-list-item-text guoji_news_content">You can now order 3D-printed "trophies" documenting your precise travels in 3D space</div>

										</div>
										<div class="am-u-sm-4 am-list-thumb">
											<a href="###" class="">
												<img class="interimg" src="img/International2.jpg" alt="我最喜欢的一张画" />
											</a>
										</div>
									</li>
									<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-right">
										<div class=" am-u-sm-8 am-list-main">
											<h3 class="am-list-item-hd"><a href="###" class="guoji_news_title urlpage" id="">Who Knew? The Waterbed Was Invented by an Industrial Design</a></h3>

											<div class="am-list-item-text guoji_news_content">You can now order 3D-printed "trophies" documenting your precise travels in 3D space</div>

										</div>
										<div class="am-u-sm-4 am-list-thumb">
											<a href="###" class="">
												<img class="interimg" src="img/International3.jpg" alt="我最喜欢的一张画" />
											</a>
										</div>
									</li>
									<!--<li class="am-g am-list-item-desced">
										<div class=" am-list-main">
											<h3 class="am-list-item-hd"><a href="###" class="guoji_news_title urlpage">An Interesting UX Design Departure for Mechanical Wristwatches</a></h3>

											<div class="am-list-item-text guoji_news_content">We like seeing designers experimenting with the gradations between two extremes. Take wristwatches, for instance. </div>

										</div>
									</li>-->
									<li class="am-g am-list-item-desced">
										<div class=" am-list-main">
											<h3 class="am-list-item-hd"><a href="###" class="guoji_news_title urlpage" id="">An Interesting UX Design Departure for Mechanical Wristwatches</a></h3>
											<ul data-am-widget="gallery" class="myAppGallery am-gallery am-avg-sm-3
        am-avg-md-3 am-avg-lg-3 am-gallery-default" data-am-gallery="{ pureview: true }">
												<li>
													<div class="am-gallery-item">
														<a href="###" class="">
															<img class="interimg" src="img/International4.jpg" alt="远方 有一个地方 那里种有我们的梦想" />

														</a>
													</div>
												</li>
												<li>
													<div class="am-gallery-item">
														<a href="###" class="">
															<img src="img/International7.jpg" alt="某天 也许会相遇 相遇在这个好地方" />

														</a>
													</div>
												</li>
												<li>
													<div class="am-gallery-item">
														<a href="###" class="">
															<img src="img/International6.jpg" alt="不要太担心 只因为我相信" />

														</a>
													</div>
												</li>

											</ul>

											<div class="am-list-item-text guoji_news_content">We like seeing designers experimenting with the gradations between two extremes. Take wristwatches, for instance. </div>

										</div>
									</li>
									<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-right">
										<div class=" am-u-sm-8 am-list-main">
											<h3 class="am-list-item-hd"><a href="###" class="guoji_news_title urlpage" id="">Who Knew? The Waterbed Was Invented by an Industrial Design</a></h3>

											<div class="am-list-item-text guoji_news_content">You can now order 3D-printed "trophies" documenting your precise travels in 3D space</div>

										</div>
										<div class="am-u-sm-4 am-list-thumb">
											<a href="###" class="">
												<img class="interimg" src="img/International5.jpg" alt="我最喜欢的一张画" />
											</a>
										</div>
									</li>
									<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-right">
										<div class=" am-u-sm-8 am-list-main">
											<h3 class="am-list-item-hd"><a href="###" class="guoji_news_title urlpage" id="">The Digitally-Fabricated Version of a Map With Red Pins In It</a></h3>

											<div class="am-list-item-text guoji_news_content">How awesome would it be to design, while still a student, the product that would set your entire future up? </div>

										</div>
										<div class="am-u-sm-4 am-list-thumb">
											<a href="###" class="">
												<img class="interimg" src="img/International1.jpg" />
											</a>
										</div>
									</li>
									<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-right">
										<div class=" am-u-sm-8 am-list-main">
											<h3 class="am-list-item-hd"><a href="###" class="guoji_news_title urlpage" id="">Who Knew? The Waterbed Was Invented by an Industrial Design</a></h3>

											<div class="am-list-item-text guoji_news_content">You can now order 3D-printed "trophies" documenting your precise travels in 3D space</div>

										</div>
										<div class="am-u-sm-4 am-list-thumb">
											<a href="###" class="">
												<img class="interimg" src="img/International5.jpg" alt="我最喜欢的一张画" />
											</a>
										</div>
									</li>
								</ul>
							</div>

						</div>

					</div>
				</div>
			</div>

		</div>
		<!-- 侧边栏内容 -->
		<div id="doc-oc-demo2" class="myAppOffcanvas am-offcanvas">
			<div class="am-offcanvas-bar">
				<div class="am-offcanvas-content">
					<div class="myAppOffcanvasUserIco">
						<img id="touxiang" src="" alt="">
					</div>
					<div class="myAppOffcanvasUserName">用户名</div>
					<div class="myAppOffcanvasInfo">个性签名</div>
					<div class="am-container">
						<div class="am-g">
							<div class="am-u-sm-6"><button type="button" class="myAppBtn am-btn am-btn-default am-round am-btn-danger updata">编辑</button></div>
							<div class="am-u-sm-6"><button type="button" class="myAppBtn am-btn am-btn-default am-round am-btn-primary userbtn">切换帐号</button></div>
						</div>
					</div>

				</div>
			</div>
		</div>
		<!--[if (gte IE 9)|!(IE)]><!-->
		<script src="js/jquery.min.js"></script>
		<!--<![endif]-->
		<!--[if lte IE 8 ]>
<script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->
		<script src="js/amazeui.min.js"></script>
		<script src="js/app.js"></script>
		<script type="text/javascript">
			$(function() {
				$lunbo1=$(".lunboimg");//2
				$contentarr = $(".car_news_content");
				$titlearr = $(".car_news_title");
				$game_titlearr = $(".myAppImgNewsTitle");
				$guoji_titlearr = $(".guoji_news_title");
				$guoji_contentarr = $(".guoji_news_content");
				$.ajax({
					type: "get",
					url: "http://127.0.0.1/news/news_content.php",
					async: true,
					dataType: "json",
					data: {
						$name: "car"
					},
					success: function(xhr) {
						$(xhr).each(function(i, v) {
							$contentarr.eq(i).text(v.content);
							$titlearr.eq(i).text(v.Title);
							$titlearr.eq(i).attr('id', v.id);
							$(".car_img").eq(i).attr('src', v.img);
							if(i<2){
								$lunbo1.eq(i).attr('src',v.img);
							}else{
								return;
							}
							
						})

					}
				});

				$.ajax({
					type: "get",
					url: "http://127.0.0.1/news/userinfo.php",
					async: true,
					dataType: "json",
					success: function(data) {
						$("#touxiang").attr('src', data[0].touxiang_img);
						$(".myAppOffcanvasUserName").text(data[0].name);
						$(".myAppOffcanvasInfo").text(data[0].string);

					}
				});

				$(".news_type").on("click", function() {
					$this = $(this).text();
					$.ajax({
						type: "get",
						url: "http://127.0.0.1/news/news_content.php",
						async: true,
						dataType: "json",
						data: {
							$name: $this
						},
						success: function(xhr) {

							$(xhr).each(function(i, v) {

								$contentarr.eq(i).text(v.content);
								$titlearr.eq(i).text(v.Title);
								$titlearr.eq(i).attr('id', v.id);
								$(".car_img").eq(i).attr('src', v.img);

								$game_titlearr.eq(i).text(v.Title);
								$game_titlearr.eq(i).attr('id', v.id);
								$(".gameimg").eq(i).attr('src', v.img);

								$guoji_titlearr.eq(i).text(v.Title);
								$guoji_contentarr.eq(i).text(v.content);
								$guoji_titlearr.eq(i).attr('id', v.id);
								$(".interimg").eq(i).attr('src', v.img);
							})

						}
					});

				})

				//点轮播图片跳转
				$(".lunboimg").on("click", function() {
					$thisimg = $(this).attr('src');
					$.ajax({
						type: "get",
						url: "http://127.0.0.1/news/luntu.php",
						async: true,
						dataType: "json",
						data: {
							img: $thisimg
						},
						success: function(xhr) {
							if(xhr != null) {
								window.location.href = "page.html?img=" + $thisimg;
							}
						}

					});
				});

				//跳转
				$(".urlpage").on("click", function() {
					$thisid = $(this).attr('id');
					$.ajax({
						type: "get",
						url: "http://127.0.0.1/news/news_details.php",
						async: true,
						dataType: "json",
						data: {
							$id: $thisid
						},
						success: function(xhr) {
							if(xhr != null) {
								window.location.href = "page.html?id=" + $thisid;
							}
						}
					});
				})
				//去登录
				$(".userbtn").on("click", function() {
					window.location.href = "news_login.html";
				})
				
				//去编辑页面
				$(".updata").on("click",function(){
					window.location.href = "news_updata.html";
				})
			});
		</script>
	</body>

</html>